﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Guoc.BigMall.Domain.Entity
{
    public class Product : BaseEntity
    {
        public Product()
        {
            this.CreatedOn = DateTime.Now;
            this.UpdatedOn = DateTime.Now;
            this.Pictures = new List<ProductPicture>();
        }
        /// <summary>
        /// 商品编码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 商品名称（后台管理使用的简短名）
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 显示名称 （前端显示的，带销售语的长名称）
        /// </summary>
        public string ShowName { get; set; }
        /// <summary>
        /// 卖点描述（商品名showName 下显示的红字描述）
        /// </summary>
        public string SellingPoint { get; set; }
        /// <summary>
        /// 规格
        /// </summary>
        public string Specification { get; set; }
       
        /// <summary>
        /// 品类
        /// </summary>
        public int CategoryId { get; set; }
        /// <summary>
        /// 品牌
        /// </summary>
        public int BrandId { get; set; }
        /// <summary>
        /// 条码
        /// </summary>
        public string BarCode { get; set; }

        /// <summary>
        /// 是否串码商品
        /// </summary>
        public bool HasSNCode { get; set; }

        /// <summary>
        /// 货号
        /// </summary>
        public string GoodsNo { get; set; }

        /// <summary>
        /// 原价：划线价
        /// </summary>
        public decimal OldPrice { get; set; }
        /// <summary>
        /// 实际销售价
        /// </summary>
        public decimal SalePrice { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedOn { get; set; }

        public int CreatedBy { get; set; }
        public int UpdatedBy { get; set; }
        public DateTime UpdatedOn { get; set; }
        /// <summary>
        /// 产地
        /// </summary>
        public string MadeIn { get; set; }
        /// <summary>
        /// 等级
        /// </summary>
        public string Grade { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }

        public ProductStatus Status { get; set; }

        public List<ProductPicture> Pictures { get; set; }
    }

    public enum ProductStatus { 
        OnSale=1,waitToSale
    }
}
